package com.sailfish.springbootdemo.controller.db1;

import com.sailfish.springbootdemo.pojo.Result;
import com.sailfish.springbootdemo.service.db1.AuditRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/auditRecord")
@CrossOrigin
public class AuditRecordController {

    @Autowired
    private AuditRecordService auditRecordService;

    @PostMapping("/getAuditRecord")
    Result getAuditRecord(Integer relatedType, Integer relatedId, Integer page, Integer pageSize) {

        return auditRecordService.getAuditRecord(relatedType, relatedId, page, pageSize);
    }
}
